package com.huhao.wshare.dto.User.Request;

import jakarta.validation.constraints.Email;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class UserRegisterRequest {
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "邮箱格式不正确")
    private String email;

    @NotBlank(message = "手机号不能为空")
    @Size(min = 11, max = 11, message = "手机号必须为11位") // 简单示例，实际可以更复杂正则
    private String phone;

    @NotBlank(message = "账号不能为空")
    @Size(min = 3, max = 20, message = "账号长度必须在3到20之间")
    private String account;

    @NotBlank(message = "用户名不能为空")
    private String username;

    @NotBlank(message = "密码不能为空")
    @Size(min = 6, message = "密码长度至少为6位")
    private String password;

    @NotBlank(message = "验证码不能为空")
    private String verificationCode;

    @NotBlank(message = "性别不能为空")
    @Pattern(regexp = "^(man|woman|empty)$", message = "填入错误，只能为man、woman、empty")
    private String gender; // 例如 "man", "woman", "empty"
}
